<p>A common pattern in note-taking is that a lot of notes will be centered
  around a certain date - e.g. you have some tasks which needs to be done
  on a certain date, you have meeting minutes from a certain date, you have
  your thoughts etc. and it all revolves around a date on which they occurred.
  For this reason, it makes sense to create a certain "day workspace" which
  will centralize all those notes relevant for a certain date.</p>
<p>For this, Trilium provides a concept of "day note". Trilium semi-automatically
  generates a single note for each day. Under this note you can save all
  those relevant notes.</p>
<p>Select an existing day note, and the menubar contains a calendar widget.
  Select any day to create a note for that day.&nbsp;</p>
<p>
  <img src="1_Day Notes_image.png">
</p>
<p>This pattern works well also because of <a href="#root/_help_IakOLONlIfGI">Cloning Notes</a> functionality
  - note can appear in multiple places in the note tree, so besides appearing
  under day note, it can also be categorized into other notes.</p>
<h2>Demo</h2>
<p>
  <img src="Day Notes_image.png">
</p>
<p>You can see the structure of day notes appearing under "Journal" note
  - there's a note for the whole year 2025, under it, you have "03 - March"
  which then contains "09 - Monday". This is our "day note" which contains
  some text in its content and also has some child notes (some of them are
  from <a href="#root/_help_xYjQUYhpbUEW">Task manager</a>).</p>
<p>You can also notice how this day note has <a href="#root/_help_OFXdgB2nNk1F">promoted attribute</a> "weight"
  where you can track your daily weight. This data is then used in <a href="#root/_help_R7abl2fc6Mxi">Weight tracker</a>.</p>
<h2>Week Note and Quarter Note</h2>
<p>Week and quarter notes are disabled by default, since it might be too
  much for some people. To enable them, you need to set <code>#enableWeekNote</code> and <code>#enableQuarterNote</code> attributes
  on the root calendar note, which is identified by <code>#calendarRoot</code> label.
  Week note is affected by the first week of year option. Be careful when
  you already have some week notes created, it will not automatically change
  the existing week notes and might lead to some duplicates.</p>
<h2>Templates</h2>
<p>Trilium provides <a href="#root/_help_KC1HB96bqqHX">template</a> functionality,
  and it could be used together with day notes.</p>
<p>You can define one of the following relations on the root of the journal
  (identified by <code>#calendarRoot</code> label):</p>
<ul>
  <li>yearTemplate</li>
  <li>quarterTemplate (if <code>#enableQuarterNote</code> is set)</li>
  <li>monthTemplate</li>
  <li>weekTemplate (if <code>#enableWeekNote</code> is set)</li>
  <li>dateTemplate</li>
</ul>
<p>All of these are relations. When Trilium creates a new note for year or
  month or date, it will take a look at the root and attach a corresponding <code>~template</code> relation
  to the newly created role. Using this, you can e.g. create your daily template
  with e.g. checkboxes for daily routine etc.</p>
<h3>Migrate from old template usage</h3>
<p>If you have been using Journal prior to version v0.93.0, the previous
  template pattern likely used was <code>~child:template=</code>.
  <br>To transition to the new system:</p>
<ol>
  <li>Set up the new template pattern in the Calendar root note.</li>
  <li>Use <a href="#root/_help_ivYnonVFBxbQ">Bulk Actions</a> to remove <code>child:template</code> and <code>child:child:template</code> from
    all notes under the Journal (calendar root).</li>
  <li>Ensure that all old template patterns are fully removed to prevent conflicts
    with the new setup.</li>
</ol>
<h2>Naming pattern</h2>
<p>You can customize the title of generated journal notes by defining a <code>#datePattern</code>, <code>#weekPattern</code>, <code>#monthPattern</code>, <code>#quarterPattern</code> and <code>#yearPattern</code> attribute
  on a root calendar note (identified by <code>#calendarRoot</code> label).
  The naming pattern replacements follow a level-up compatibility - each
  level can use replacements from itself and all levels above it. For example, <code>#monthPattern</code> can
  use month, quarter and year replacements, while <code>#weekPattern</code> can
  use week, month, quarter and year replacements. But it is not possible
  to use week replacements in <code>#monthPattern</code>.</p>
<h3>Date pattern</h3>
<p>It's possible to customize the title of generated date notes by defining
  a <code>#datePattern</code> attribute on a root calendar note (identified
  by <code>#calendarRoot</code> label). Following are possible values:</p>
<ul>
  <li><code>{isoDate}</code> results in an ISO 8061 formatted date (e.g. "2025-03-09"
    for March 9, 2025)</li>
  <li><code>{dateNumber}</code> results in a number like <code>9</code> for the
    9th day of the month, <code>11</code> for the 11th day of the month</li>
  <li><code>{dateNumberPadded}</code> results in a number like <code>09</code> for
    the 9th day of the month, <code>11</code> for the 11th day of the month</li>
  <li><code>{ordinal}</code> is replaced with the ordinal date (e.g. 1st, 2nd,
    3rd) etc.</li>
  <li><code>{weekDay}</code> results in the full day name (e.g. <code>Monday</code>)</li>
  <li><code>{weekDay3}</code> is replaced with the first 3 letters of the day,
    e.g. Mon, Tue, etc.</li>
  <li><code>{weekDay2}</code> is replaced with the first 2 letters of the day,
    e.g. Mo, Tu, etc.</li>
</ul>
<p>The default is <code>{dateNumberPadded} - {weekDay}</code>
</p>
<h3>Week pattern</h3>
<p>It is also possible to customize the title of generated week notes through
  the <code>#weekPattern</code> attribute on the root calendar note. The options
  are:</p>
<ul>
  <li><code>{weekNumber}</code> results in a number like <code>9</code> for the
    9th week of the year, <code>11</code> for the 11th week of the year</li>
  <li><code>{weekNumberPadded}</code> results in a number like <code>09</code> for
    the 9th week of the year, <code>11</code> for the 11th week of the year</li>
  <li><code>{shortWeek}</code> results in a short week string like <code>W9</code> for
    the 9th week of the year, <code>W11</code> for the 11th week of the year</li>
  <li><code>{shortWeek3}</code> results in a short week string like <code>W09</code> for
    the 9th week of the year, <code>W11</code> for the 11th week of the year</li>
</ul>
<p>The default is <code>Week {weekNumber}</code>
</p>
<h3>Month pattern</h3>
<p>It is also possible to customize the title of generated month notes through
  the <code>#monthPattern</code> attribute on the root calendar note. The options
  are:</p>
<ul>
  <li><code>{isoMonth}</code> results in an ISO 8061 formatted month (e.g. "2025-03"
    for March 2025)</li>
  <li><code>{monthNumber}</code> results in a number like <code>9</code> for September,
    and <code>11</code> for November</li>
  <li><code>{monthNumberPadded}</code> results in a number like <code>09</code> for
    September, and <code>11</code> for November</li>
  <li><code>{month}</code> results in the full month name (e.g. <code>September</code> or <code>October</code>)</li>
  <li><code>{shortMonth3}</code> is replaced with the first 3 letters of the
    month, e.g. Jan, Feb, etc.</li>
  <li><code>{shortMonth4}</code> is replaced with the first 4 letters of the
    month, e.g. Sept, Octo, etc.</li>
</ul>
<p>The default is <code>{monthNumberPadded} - {month}</code>
</p>
<h3>Quarter pattern</h3>
<p>It is also possible to customize the title of generated quarter notes
  through the <code>#quarterPattern</code> attribute on the root calendar note.
  The options are:</p>
<ul>
  <li><code>{quarterNumber}</code> results in a number like <code>1</code> for
    the 1st quarter of the year</li>
  <li><code>{shortQuarter}</code> results in a short quarter string like <code>Q1</code> for
    the 1st quarter of the year</li>
</ul>
<p>The default is <code>Quarter {quarterNumber}</code>
</p>
<h3>Year pattern</h3>
<p>It is also possible to customize the title of generated year notes through
  the <code>#yearPattern</code> attribute on the root calendar note. The options
  are:</p>
<ul>
  <li><code>{year}</code> results in the full year (e.g. <code>2025</code>)</li>
</ul>
<p>The default is <code>{year}</code>
</p>
<h2>Implementation</h2>
<p>Trilium has some special support for day notes in the form of <a href="https://triliumnext.github.io/Notes/backend_api/BackendScriptApi.html">backend Script API</a> -
  see e.g. getDayNote() function.</p>
<p>Day (and year, month) notes are created with a label - e.g. <code>#dateNote="2025-03-09"</code> this
  can then be used by other scripts to add new notes to day note etc.</p>